package top.italks.safeandroid;

import androidx.activity.result.contract.ActivityResultContract;
import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;

import top.italks.safeandroid.extend.CircleProgressView;
import top.italks.safeandroid.extend.TopBar;

public class start extends AppCompatActivity {
    public static String RESULT_KEY = "resultkey";
    public TopBar mTopBar;
    private CircleProgressView mCircleProgressView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_start);
//        setContentView(R.layout.topbar_test);
        setContentView(R.layout.circle_progress);

        Intent intent = new Intent(start.this, MainActivity.class);
        intent.putExtra(MainActivity.RESULTKEY, true);
        setResult(1, intent);
//        ActivityResultContract
//        registerForActivityResult()
//        mTopBar = findViewById(R.id.topBar);
//        mTopBar.setButtonVisable(1, true);
//        mTopBar.setOnTopbarClickListener(new TopBar.topbarClickListener() {
//            @Override
//            public void leftClick() {
//                Toast.makeText(start.this, "left", Toast.LENGTH_SHORT).show();
//            }
//
//            @Override
//            public void rightClick() {
//                Toast.makeText(start.this, "right", Toast.LENGTH_SHORT).show();
//            }
//        });



        mCircleProgressView = findViewById(R.id.circle);
        mCircleProgressView.setSweepValue(70);

    }
}